<template>
  <div style="width:600px;height:600px" ref="reference" id="main"></div>
</template>
<script>
var echarts = require("echarts");

export default {
  created() {
    console.log(echarts);
  },
  mounted() {
    var myChart = echarts.init(this.$refs.reference);

    myChart.setOption({
      visualMap: {
        show: false,
        min: 80,
        max: 600,
        inRange: {
          colorLightness: [0, 1]
        }
      },
      legend: {
        data: ["销量"]
      },
      xAxis: {
        data: ["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"]
      },
      yAxis: {},
      series: [
        {
          name: "销量",
          type: "bar",
          data: [5, 20, 36, 10, 10, 20]
        },
        {
          name: "销量",
          type: "line",
          data: [5, 20, 36, 10, 10, 20]
        }
      ]
    });
  }
};
</script>